<template>
    <div class="card">
        <div class="top">
            <div class="c-1">
                票据编号:{{bill.billNumber}}
                <span class="flaw" v-if="bill.billFlawIds[0] !== '1500'">瑕疵</span>
            </div>
            <div class="c-2">
                创建日期:{{bill.createTime}}
            </div>
            <div class="c-3">
                <slot :bill="bill" name="opera"></slot>
            </div>
        </div>
        <div class="body">
            <div class="c-1">
                <div class="type">
                  {{bill.billNatureName}}
                </div>
                <div class="line">
                    <div class="l-1">{{bill.acceptor}}</div>
                    <div class="l-2">票面金额: <span style="color:red;"> {{bill.faceValue/10000}}万</span> 到期日: {{bill.expiryDate}}
                    </div>
                </div>
            </div>
            <div class="c-2">
                <!--<span>{{bill.biddingMethodName}}</span>-->
                <!--<p>{{bill.expectedPrice}}</p>-->
                <span class="bidding-type">{{bill.biddingMethodName}}</span>
                <p class="bill-rate-3210">{{bill.expectedPrice}}</p>
            </div>
            <div class="c-3">
                <slot :bill="bill" name="tips"></slot>
            </div>
        </div>
        <slot :bill="bill" name="expand"></slot>

    </div>

</template>
<script lang="ts">
  import { Vue, Component, Prop } from 'vue-property-decorator'

  @Component({})
  export default class BillCardBase extends Vue {
    @Prop() bill
  }
</script>
<style lang="less" scoped>
    .card {
        box-shadow: 0 2px 12px 0 #ddd;
        min-height: 150px;
        margin-bottom: 10px;
        font-size: 16px;
        color: #666;
        .top {
            padding: 0 20px;
            display: flex;
            flex-direction: row;
            line-height: 50px;
            border-bottom: 1px solid #ddd;
            justify-content: space-around;
        }
        .body {
            display: flex;
            justify-content: space-around;
            padding: 18px 20px;
            .c-1 {
                display: flex;
            }
            .c-2, .c-3 {
                line-height: 30px;
            }
            .type {
                line-height: 60px;
                font-size: 24px;
                border-right: 1px solid #ddd;
                width: 80px;
                text-align: center;
            }
            .line {
                line-height: 30px;
                padding-left: 12px;
            }
        }
        .c-1 {
            flex: 3;
        }
        .c-2 {
            text-align: center;
            flex: 1;
        }
        .c-3 {
            text-align: center;
            flex: 1;
        }
        &:last-child {
            margin: 0;
        }
    }

    .flaw {
        background: rgba(222, 92, 95, 1);
        border-radius: 2px;
        color: #fff;
        font-size: 14px;
        padding: 4px 10px;
    }
    .bidding-type {
        background: rgba(242, 246, 249, 1);
        border-radius: 2px;
        color: #666;
        font-size: 14px;
        padding: 4px 10px;
    }
    .bill-rate-3210 {
        color: #E84F5A;
    }
</style>
